USE [texchange_db]
GO

/****** Object:  UserDefinedFunction [dbo].[Fn_GetPage]    Script Date: 05/29/2011 19:58:01 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE FUNCTION [dbo].[Fn_GetPage] 
(	
	@lang_id  bigint,
	@page_id bigint
	-- Add the parameters for the function here
)
RETURNS TABLE 
AS
RETURN 
(
	-- Add the SELECT statement with parameter references here
	SELECT [id], [page_id], [html], [keywords], [language_id], [parent_id] from [Pages]
	WHERE language_id = @lang_id AND page_id=@page_id
)

GO


